<%include header %>
<div class="post-content mt-80">
  <div class="container">
    <div class="">
      <h2 class="title mb-30 bd-left-6 bd-color-primary">
        <a href="/post/<%= post._id?.toString()%>"><%= post.title%></a>
      </h2>
      <div class="user-header mb-30">
        <div class="left">
          <a class="avatar avatar-link" href="/user/<%= post.authorId?.toString() %>">
            <img class="avatar" src="<%= post.author.avatar || '/img/avatar.png' %>" />
          </a>
          <div>
            <h4> <a href="/user/<%= post.authorId?.toString() %>"><%= post.author.username %></a></h4>
            <p>
              发表于 <%= post.created %>
              <span>浏览(<%= post.pv %>)</span>
              <span>留言(<%= post.commentCount %>)</span>
            </p>
          </div>
        </div>

        <div class="right">
          <%- include('post-menu', {post}) %>
        </div>
      </div>

      <% if(post.img) {%>
      <div class="img-wrap mb-50">
        <img src="<%= post.img%>" alt="" />
      </div>
      <%}%>
      <div class="post-content__body mt-30 mb-20">
        <%- post.content%>
    </div>
  </div>

  <%- include('comments', {post, comments: []}) %>
</div>
</div>

<%include footer %>
